package cn.iocoder.yudao.module.scrm.controller.admin.customer.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.scrm.annotations.DictField;
import cn.iocoder.yudao.module.scrm.controller.admin.commom.vo.FileInfoVO;
import cn.iocoder.yudao.module.scrm.enums.DictTypeConstants;
import cn.iocoder.yudao.module.scrm.framework.operatelog.core.*;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static cn.iocoder.yudao.module.scrm.enums.DictTypeConstants.*;

/**
 * @Author LiZhiMin
 * @Date 2024/9/9 19:15
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
@Schema(description = "管理后台 - 导出客户模板和导入excel Response VO")
public class CustomerImportExcelVO {

    @Schema(description = "客户名称", example = "李四")
    @ExcelProperty("客户名称")
    @DiffLogField(name = "客户名称")
    private String name;

    @Schema(description = "企业")
    @ExcelProperty("企业名称")
    @DiffLogField(name = "企业名称")
    private String enterprise;

    @Schema(description = "号码")
    @ExcelProperty("手机号码")
    @DiffLogField(name = "手机号码")
    private String phone;

    @Schema(description = "线索来源")
    @ExcelProperty("线索来源")
    @DiffLogField(name = "线索来源")
    private String clueSource;

    @Schema(description = "获客时间")
    @ExcelProperty("获客时间")
    @DiffLogField(name = "获客时间")
    private LocalDateTime customerSourceTime;

    @Schema(description = "客户来源  scrm_clue_client")
    @DiffLogField(name = "客户来源", function = ScrmClueClientFunction.NAME)
    @DictFormat(SCRM_CLUE_CLIENT)
    @ExcelProperty(value = "客户来源",converter = DictConvert.class)
    private String customerSource;


    @Schema(description = "素材来源")
    @ExcelProperty("素材来源")
    @DiffLogField(name = "素材来源")
    private String materialSource;

    @Schema(description = "信息来源  scrm_clue_info")
    @DictFormat(SCRM_CLUE_INFO)
    @DiffLogField(name = "信息来源", function = ScrmClueInfoFunction.NAME)
    @ExcelProperty(value = "信息来源",converter = DictConvert.class)
    private String infoSource;


    @Schema(description = "客户意向  scrm_clue_idea")
    @ExcelProperty(value = "客户意向",converter = DictConvert.class)
    @DiffLogField(name = "客户意向", function = ScrmClueIdeaFunction.NAME)
    @DictFormat(SCRM_CLUE_IDEA)
    private String clientQuality;

    @Schema(description = "客户等级，对应字典 scrm_customer_level")
    @ExcelProperty(value = "客户等级", converter = DictConvert.class)
    @DiffLogField(name = "客户等级", function = ScrmCustomerLevelFunction.NAME)
    @DictFormat(SCRM_CUSTOMER_LEVEL)
    private String level;


    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    @DiffLogField(name = "备注")
    private String remark;








    @Schema(description = "客户阶段 scrm_customer_stage")
    @DiffLogField(name = "客户阶段", function = ScrmCustomerStageFunction.NAME)
    @DictFormat(SCRM_CUSTOMER_STAGE)
    @ExcelProperty(value = "客户阶段",converter = DictConvert.class)
    private String customerStage;



    @Schema(description = "年营业额 scrm_year_turnover")
    @DiffLogField(name = "年营业额", function = ScrmYearTurnoverFunction.NAME)
    @DictFormat(SCRM_YEAR_TURNOVER)
    @ExcelProperty(value = "年营业额",converter = DictConvert.class)
    private String yearTurnover;


    @Schema(description = "分公司 scrm_son_company")
    @DiffLogField(name = "分公司", function = ScrmSonCompanyFunction.NAME)
    @DictFormat(SCRM_SON_COMPANY)
    @ExcelProperty(value = "分公司",converter = DictConvert.class)
    private String sonCompany;


    @Schema(description = "回款方式 scrm_son_company")
    @DiffLogField(name = "回款方式", function = ScrmReceivableMethodFunction.NAME)
    @DictFormat(SCRM_PAYMENT_METHOD)
    @ExcelProperty(value = "回款方式",converter = DictConvert.class)
    private String receivableMethod;

    @Schema(description = "峰会是否签到 scrm_summit_status")
    @DiffLogField(name = "峰会是否签到", function = ScrmSummitStatusFunction.NAME)
    @DictFormat(SCRM_SUMMIT_STATUS)
    @ExcelProperty(value = "峰会是否签到",converter = DictConvert.class)
    private String summitStatus;


    @Schema(description = "职位", example = "职位")
    @ExcelProperty("职位")
    @DiffLogField(name = "职位")
    private String position;

    @Schema(description = "身份证号", example = "身份证号")
    @ExcelProperty("身份证号")
    @DiffLogField(name = "身份证号")
    private String idCard;

    @Schema(description = "邀约人", example = "邀约人")
    @ExcelProperty("邀约人")
    @DiffLogField(name = "邀约人")
    private String inviter;

    @Schema(description = "回款金额", example = "6.66")
    @ExcelProperty("回款金额")
    @DiffLogField(name = "回款金额")
    private BigDecimal receivablePrice;

    @Schema(description = "回款时间", example = "2020-02-02 02:02:02")
    @ExcelProperty("回款时间")
    @DiffLogField(name = "回款时间")
    private LocalDateTime receivableTime;



    @Schema(description = "峰会组别", example = "峰会组别")
    @ExcelProperty("峰会组别")
    @DiffLogField(name = "峰会组别")
    private String summitGroup;

    @Schema(description = "员工人数", example = "员工人数")
    @ExcelProperty("员工人数")
    @DiffLogField(name = "员工人数")
    private String numberPeople;

    @Schema(description = "需求及痛点", example = "需求及痛点")
    @ExcelProperty("需求及痛点")
    @DiffLogField(name = "需求及痛点")
    private String quantityPain;


}
